package com.quanxiaoha.weblog.web.service;

import com.quanxiaoha.weblog.common.utils.Response;
import com.quanxiaoha.weblog.web.model.vo.ai.AiChatReqVO;
import com.quanxiaoha.weblog.web.model.vo.ai.CreateNewConversationReqVO;
import com.quanxiaoha.weblog.web.model.vo.ai.DeleteAiConversationReqVO;
import com.quanxiaoha.weblog.web.model.vo.ai.GetAiChatHistoryReqVO;
import com.quanxiaoha.weblog.web.model.vo.ai.GetConversationListReqVO;
import com.quanxiaoha.weblog.web.model.vo.ai.TextSelectionAiReqVO;
import org.springframework.http.ResponseEntity;
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;

/**
 * @author: 犬小哈
 * @url: www.quanxiaoha.com
 * @date: 2024-01-15
 * @description: AI助手服务
 **/
public interface AiService {

    /**
     * AI助手聊天
     * @param aiChatReqVO
     * @return
     */
    Response chat(AiChatReqVO aiChatReqVO);

    /**
     * 删除AI对话
     * @param deleteAiConversationReqVO
     * @return
     */
    Response deleteConversation(DeleteAiConversationReqVO deleteAiConversationReqVO);
    
    /**
     * 获取AI聊天历史记录
     * @param getAiChatHistoryReqVO
     * @return
     */
    Response getChatHistory(GetAiChatHistoryReqVO getAiChatHistoryReqVO);

    /**
     * 创建新对话
     * @param createNewConversationReqVO
     * @return
     */
    Response createNewConversation(CreateNewConversationReqVO createNewConversationReqVO);

    /**
     * 获取对话列表
     * @param getConversationListReqVO
     * @return
     */
    Response getConversationList(GetConversationListReqVO getConversationListReqVO);

    /**
     * 文章划词AI交互
     * @param textSelectionAiReqVO
     * @return
     */
    Response textSelectionChat(TextSelectionAiReqVO textSelectionAiReqVO);

    /**
     * AI助手流式聊天
     * @param aiChatReqVO
     * @return
     */
    ResponseEntity<StreamingResponseBody> streamChat(AiChatReqVO aiChatReqVO);
}